/*
 * Copyright (c) 2001, 2002 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 */

package net.sourceforge.perforce.core;

import net.sourceforge.perforce.core.internal.P4TeamProvider;
import org.eclipse.core.resources.IFileModificationValidator;
import org.eclipse.core.resources.team.IMoveDeleteHook;

/** The provider factory is used by the system to create instances of IMoveDeleteHook and
  * IFileModificationValidator. An implementation for the interface has to be provided by the
  * UI component because both interface are likely to interact with the user.
  * 
  * @version $Revision: 67 $
  * @author  <a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public interface IProviderFactory 
{
	// ------------------------------------------------------------------------------------- Methods

	/** Call this method to create an IMoveDeleteHook implementation for the given provider.
	  *
	  * @param provider the P4TeamProvider that needs an IMoveDeleteHook.
	  * @return the new IMoveDeleteHook instance.
	  */
	IMoveDeleteHook createMoveDeleteHook(P4TeamProvider provider);
	
	/** This method should be called to create a new IFileModificationValidator for the 
	  * specified P4TeamProvider.
	  * 
	  * @param provider the P4TeamProvider that needs an IFileModificationValidator.
	  * @return the IFileModificationValidator. 
	  */
	IFileModificationValidator createFileModificationValidator(P4TeamProvider provider);	
}
